<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>Document</title>
    <style>
        .c1 {
            width: auto;
            background-color: aliceblue;
            color: coral;
        }

        .c2 {
            width: auto;
            background-color: coral;
            color: aliceblue;
            font-size: 50px;
        }
    </style>
</head>

<body>
    <div id="app">
        <span :class="style">绑定class</span> <br>
        <span :style="[s1,s2]">绑定style</span>
    </div>

</body>

<script>
    const vm = new Vue({
        el: "#app",
        data: {
            style: 'c2',
            s1:{
                backgroundColor:'lightgray',
                color:'blue',
            },
            s2:{
                fontSize:'100px'
            }
        }
    });

</script>

</html>